package org.jdcenter.rmi;

import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdcenter.rmi.abs.ChannelException;
import org.jdcenter.rmi.abs.ChannelFactory;
import org.jdcenter.rmi.abs.URLException;
import org.jdcenter.rmi.impl.RMIFactory;

public class JDSName {
	private static Log log = LogFactory.getLog(JDSName.class);
	private static ChannelFactory channelFactory ;
	
	static{
		try {
			channelFactory = RMIFactory.getChannelFactory("jds.rmi.properties");
		} catch (IOException e) {
			log.error(e);
		}
	}
	
	public static Object lookup(String url){
		
		return null;
	}
	
	public static Object lookup(String url,JDSCallback callback) throws URLException, ChannelException{		
		return channelFactory.alloc(url,callback);
	}

}
